<?php
	ob_start();
	session_start();
	include ("config.php");
	include ("init.php");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">
	<head>
		<title><?php echo WEB_TITLE; ?></title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
		<link type="text/css" rel="stylesheet" href="css/style.css" />
		<script type="text/javascript" src="js/jquery.js"></script>
		<script type="text/javascript" src="js/site.js"></script>
	</head>
	
	<body>
		<div id="wrapper">
			<div id="header">
				<div id="logo">
					<span><?php echo WEB_TITLE; ?></span>
				</div>
			</div>
			<div id="body">
				<div id="body_left">
					<div id="menu">
						<div id="title-left">Menu</div>
						<a href="index.php">» Home</a>
						<?php if(isset($_SESSION[''.SECURITY_SESSION.''])){
							echo "<a href='index.php?page=my_account'>» My account</a>";
							echo "<a href='index.php?page=cmfs'>» CMFs</a>";
							if($_SESSION[''.SECURITY_SESSION.'']['admin'] == 'TRUE'){
								echo "<a href='javascript:void()' id='menu_management_button'>» Management</a>";
								echo "<div id='menu_management'><a href='index.php?page=manager_user'>» Users</a>";
								echo "<a href='index.php?page=pendency'>» Pending</a></div>";
							}
							echo "<a href='index.php?page=logout'>» Logout</a>";
						}else{
							echo "<a href='index.php?page=request_account'>» Request account</a>";
							echo "<a href='index.php?page=forgot_password'>» Forgot password?</a>";
						}
						?>
					</div>

					<div>
						<?php	include ("login_account.php");	?>
					</div>
				</div>
				<div id="body_right">
					<?php
						if(isset($login_message)){
							echo $login_message;
						}else
							include ("pages.php");
					?>
					<div id="footer">
						<a href="http://www.fibre-ict.eu/" target="_blank"><img src="images/fibreFooter.jpg"></a>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
